package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 出差申请对象 business_trips
 *
 * @author ruoyi
 * @date 2025-03-21
 */
public class BusinessTrips extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 申请ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 审批人ID */
    @Excel(name = "审批人ID")
    private Long approverId;

    /** 出差目的地 */
    @Excel(name = "出差目的地")
    private String destination;

    /** 出差开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出差开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 出差结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出差结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 出差目的 */
    @Excel(name = "出差目的")
    private String purpose;

    /** 审批状态 */
    @Excel(name = "审批状态")
    private String status;

    /** 审批结果（返回前端页面） */
    @Excel(name = "审批结果", readConverterExp = "返=回前端页面")
    private String result;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    private String userName;

    private String approverName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getApproverName() {
        return approverName;
    }

    public void setApproverName(String approverName) {
        this.approverName = approverName;
    }

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;


    /* 新增一个字段代替VO层，用于联表查询*/
    @Excel(name = "用户昵称")
    private String nickName;

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setApproverId(Long approverId)
    {
        this.approverId = approverId;
    }

    public Long getApproverId()
    {
        return approverId;
    }

    public void setDestination(String destination)
    {
        this.destination = destination;
    }

    public String getDestination()
    {
        return destination;
    }

    public void setStartDate(Date startDate)
    {
        this.startDate = startDate;
    }

    public Date getStartDate()
    {
        return startDate;
    }

    public void setEndDate(Date endDate)
    {
        this.endDate = endDate;
    }

    public Date getEndDate()
    {
        return endDate;
    }

    public void setPurpose(String purpose)
    {
        this.purpose = purpose;
    }

    public String getPurpose()
    {
        return purpose;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setResult(String result)
    {
        this.result = result;
    }

    public String getResult()
    {
        return result;
    }

    public void setApprovalTime(Date approvalTime)
    {
        this.approvalTime = approvalTime;
    }

    public Date getApprovalTime()
    {
        return approvalTime;
    }

    public void setCreatedTime(Date createdTime)
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime()
    {
        return createdTime;
    }

    public void setUpdatedTime(Date updatedTime)
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime()
    {
        return updatedTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("approverId", getApproverId())
                .append("destination", getDestination())
                .append("startDate", getStartDate())
                .append("endDate", getEndDate())
                .append("purpose", getPurpose())
                .append("status", getStatus())
                .append("result", getResult())
                .append("approvalTime", getApprovalTime())
                .append("createdTime", getCreatedTime())
                .append("updatedTime", getUpdatedTime())
                .append("userName",getUserName())
                .append("approverName",getApproverName())
                .toString();
    }
}
